Repository navigation
Report unknown long options by name under rfl::NoExtraFields in rfl::cli - #34
Open
clockblocker wants to merge 1 commit into
Open
clockblocker wants to merge 1 commit into
clockblocker wants to merge 1 commit into
Conversation
clockblocker
force-pushed
the
cli-unknown-long-options
branch
from
November 16, 2026 05:18
c8d63f6 to
3528357
Compare
clockblocker
force-pushed
the
wave-base-4
branch
from
November 16, 2026 05:18
55507ad to
264645e
Compare
clockblocker
force-pushed
the
cli-unknown-long-options
branch
2 times, most recently
from
November 17, 2026 05:11
f7ed9ab to
737860c
Compare
clockblocker
force-pushed
the
wave-base-4
branch
2 times, most recently
from
November 17, 2026 07:15
773baae to
da208f8
Compare
clockblocker
force-pushed
the
cli-unknown-long-options
branch
from
November 17, 2026 07:15
737860c to
944f187
Compare
With rfl::NoExtraFields, `--nope=1` failed with "Value named 'nope' not used." and `--nope 1` with "Too many positional arguments: ...". The option table now lists every long option, through nested structs, maps and rfl::ExtraFields, so parse_argv rejects both with "Unknown option '--nope'.". Keys of maps and rfl::ExtraFields stay open; the fields of a struct inside a map are known (`--servers.eu.nope` is unknown). Without rfl::NoExtraFields, unknown long options are still ignored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
clockblocker
force-pushed
the
wave-base-4
branch
from
November 17, 2026 09:20
da208f8 to
9a90181
Compare
clockblocker
force-pushed
the
cli-unknown-long-options
branch
from
November 17, 2026 09:20
944f187 to
3ca421e
Compare
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Under
rfl::NoExtraFields,rfl::cli::readrejects unknown long options by name (Unknown option '--...') instead of misreporting them as unused values or extra positional arguments.Example
rfl::NoExtraFields)main)--nope=1Value named 'nope' not used.Unknown option '--nope'.--nope 1 in.txtToo many positional arguments: expected at most 1, got 2.Unknown option '--nope'.--database.nope 1Too many positional arguments: expected at most 0, got 1.Unknown option '--database.nope'.--servers.eu.nope=1Found 2 errors: ...Unknown option '--servers.eu.nope'.Key details
rfl::ExtraFieldsinto the option table only whenrfl::NoExtraFieldsis active (no behavior change without it).rfl::ExtraFieldskeys stay open (--labels.env=prod), while fields of structs inside maps are checked (--servers.eu.nope=1).cli.md("Unknown options").AI-authored. Depends on: #22.